<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
	function check() {
		var pass1 = document.getElementById("password1").value;
		var pass2 = document.getElementById("password2").value;
		if (pass1 == pass2) {
			document.forms["passwordform"].submit();
		} else {
			alert("enter same passwords");
		}

	}
</script>
</head>
<body>
	<s:actionerror />

	<s:if test="flag==1">
		<form
			action="forgotpassword.action?login_id=<s:property value="login_id"/>&site=<s:property value="site"/>&reset=yes"
			method="post" id="form2">
			<s:property value="question" />
			: <input type="text" name="security_question_answer" /> <br /> <input
				type="submit" value="Submit" />
		</form>
	</s:if>
	<s:elseif test="flag==0">
		<form action="forgotpassword.action" method="post">
			Enter your Login Id : <input type="text" name="login_id"
				id="login_id" /> Enter your Site Id : <input type="text"
				name="site" id="site" /> <br /> <input type="submit" value="Next" />
		</form>
	</s:elseif>
	<s:elseif test="flag==2">

		<form action="forgotpassword.action?login_id=<s:property value="login_id"/>&site=<s:property value="site"/>"
			method="post" id="passwordform">

			Enter new password : <input type="password" name="password1"
				id="password1" /> <br /> Re-Enter new Password : <input type="password"
				name="password2" id="password2" /> <br /> <input type="button"
				value="Reset" onclick="check()"/>
		</form>

	</s:elseif>
</body>
</html>